package edu.ahut.designpattern.chainresponsibility.demo;

public class Application {
    public static void main(String[] args) {
        Handler[] handlers = new Handler[]{
                new IntFactorialHandler(),
                new LongFactorialHandler(),
                new BigIntegerFactorialHandler(),

        };
        for (int i = 0; i + 1 < handlers.length; i++) {
            handlers[i].setNextHandler(handlers[i + 1]);
        }
        int n = 500;
        handlers[0].handleRequest(n);
    }
}
